import request from '@/utils/request'
// 获取角色列表数据
export function getRoleListApi(params) {
  return request({
    url: '/permission/role',
    method: 'get',
    params
  })
}
// 给员工关联角色
export function setRoleAuthApi(data) {
  return request({
    url: '/permission/role',
    method: 'post',
    data
  })
}
// 数据回显
export function getRoleInfoApi(id) {
  return request({
    url: '/permission/role/' + id,
    method: 'get'
  })
}
// 删除数据
export function delRoleInfoApi(id) {
  return request({
    url: '/permission/role/' + id,
    method: 'delete'

  })
}
// 修改数据提交请求
export function updateRoleApi(data) {
  return request({
    url: 'permission/role/' + data.id,
    method: 'put',
    data
  })
}

